package com.duobaoyu.dby.supply.common.biz.dto.config;

import com.duobaoyu.dby.common.core.validator.groups.Add;
import com.duobaoyu.dby.common.core.validator.groups.Edit;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 渠道回调路径映射入参
 * @Author yangyong
 * @Date 2023/4/27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@ApiModel(value = "ChannelCallbackMappingDTO", description = "渠道回调路径映射入参对象")
public class ChannelCallbackMappingDTO implements Serializable{
	private static final long serialVersionUID = 8627178053227607903L;

	/**
	 * 主键ID
	 */
	@NotNull(message = "主键ID不能为空",groups = {Edit.class})
	@ApiModelProperty(value = "主键ID")
	private Long id;
	/**
	 * 渠道编码
	 */
	@NotBlank(message = "渠道编码不能为空",groups = {Add.class, Edit.class})
	@ApiModelProperty(value = "渠道编码")
	private String channelCode;
	/**
	 * 回调域名
	 */
	@NotBlank(message = "回调域名不能为空",groups = {Add.class, Edit.class})
	@ApiModelProperty(value = "回调域名")
	private String host;
	/**
	 * 渠道回调接口路径
	 */
	@NotBlank(message = "渠道回调地址不能为空",groups = {Add.class, Edit.class})
	@Length(max = 120, message = "渠道回调地址120个字以内", groups = {Add.class, Edit.class})
	@ApiModelProperty(value = "渠道回调地址")
	private String channelPath;
	/**
	 * 映射回调接口路径
	 */
	@NotBlank(message = "平台回调地址不能为空",groups = {Add.class, Edit.class})
	@Length(max = 120, message = "平台回调地址120个字以内", groups = {Add.class, Edit.class})
	@ApiModelProperty(value = "平台回调地址")
	private String mappingPath;
	/**
	 * 备注
	 */
	@NotBlank(message = "回调描述不能为空",groups = {Add.class, Edit.class})
	@Length(max = 120, message = "回调描述120个字以内", groups = {Add.class, Edit.class})
	@ApiModelProperty(value = "回调描述")
	private String remark;
}
